package com.yonyou.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 权限-菜单按钮表
 * </p>
 *
 * @author wangchu
 * @since 2023-11-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SEC_SCS_AUTH_PERMISSION")
public class SecScsAuthPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("ID")
    private String id;

    /**
     * 父级主键
     */
    @TableField("PID")
    private String pid;

    /**
     * 权限代码
     */
    @TableField("CODE")
    private String code;

    /**
     * 权限名称
     */
    @TableField("NAME")
    private String name;

    /**
     * 权限模块
     */
    @TableField("MODEL")
    private String model;

    /**
     * 权限全路径
     */
    @TableField("FULL_PATH")
    private String fullPath;

    /**
     * 权限URL
     */
    @TableField("URL")
    private String url;

    /**
     * 是否按钮
     */
    @TableField("BELONG_BUTTON")
    private Integer belongButton;

    /**
     * 存在状态
     */
    @TableField("STATE")
    private Integer state;

    @TableField("ICON")
    private String icon;

    @TableField(exist = false)
    private List<SecScsAuthPermission> children = new ArrayList<>();

    @TableField(exist = false)
    private String pName;

    /**
     * 选中标识
     */
    @TableField(exist = false)
    private Map<String, Integer> checkArr;
}